\(\int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx\) [453]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 25, antiderivative size = 177 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {1}{6} d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) x+\frac {2 d \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right ) \cos (e+f x)}{9 f}+\frac {d^2 \left (6 c^2-20 c d+9 d^2\right ) \cos (e+f x) \sin (e+f x)}{18 f}+\frac {(3 c-4 d) d \cos (e+f x) (c+d \sin (e+f x))^2}{9 f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{f (3+3 \sin (e+f x))} \]

[Out]

1/2*d*(8*c^3-12*c^2*d+12*c*d^2-3*d^3)*x/a+2/3*d*(3*c^3-16*c^2*d+12*c*d^2-4*d^3)*cos(f*x+e)/a/f+1/6*d^2*(6*c^2-
20*c*d+9*d^2)*cos(f*x+e)*sin(f*x+e)/a/f+1/3*(3*c-4*d)*d*cos(f*x+e)*(c+d*sin(f*x+e))^2/a/f-(c-d)*cos(f*x+e)*(c+
d*sin(f*x+e))^3/f/(a+a*sin(f*x+e))

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.07, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2846, 2832, 2813} \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {d^2 \left (6 c^2-20 c d+9 d^2\right ) \sin (e+f x) \cos (e+f x)}{6 a f}+\frac {2 d \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right ) \cos (e+f x)}{3 a f}+\frac {d x \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right )}{2 a}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{f (a \sin (e+f x)+a)}+\frac {d (3 c-4 d) \cos (e+f x) (c+d \sin (e+f x))^2}{3 a f} \]

[In]

Int[(c + d*Sin[e + f*x])^4/(a + a*Sin[e + f*x]),x]

[Out]

(d*(8*c^3 - 12*c^2*d + 12*c*d^2 - 3*d^3)*x)/(2*a) + (2*d*(3*c^3 - 16*c^2*d + 12*c*d^2 - 4*d^3)*Cos[e + f*x])/(
3*a*f) + (d^2*(6*c^2 - 20*c*d + 9*d^2)*Cos[e + f*x]*Sin[e + f*x])/(6*a*f) + ((3*c - 4*d)*d*Cos[e + f*x]*(c + d
*Sin[e + f*x])^2)/(3*a*f) - ((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(f*(a + a*Sin[e + f*x]))

Rule 2813

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(2*a*c +
 b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Cos[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2832

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Sim
p[b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2846

Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(
b*c - a*d))*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n - 1)/(a*f*(a + b*Sin[e + f*x]))), x] - Dist[d/(a*b), Int[(c
+ d*Sin[e + f*x])^(n - 2)*Simp[b*d*(n - 1) - a*c*n + (b*c*(n - 1) - a*d*n)*Sin[e + f*x], x], x], x] /; FreeQ[{
a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 1] && (IntegerQ
[2*n] || EqQ[c, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{f (a+a \sin (e+f x))}-\frac {d \int (-a (4 c-3 d)+a (3 c-4 d) \sin (e+f x)) (c+d \sin (e+f x))^2 \, dx}{a^2} \\ & = \frac {(3 c-4 d) d \cos (e+f x) (c+d \sin (e+f x))^2}{3 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{f (a+a \sin (e+f x))}-\frac {d \int (c+d \sin (e+f x)) \left (-a \left (12 c^2-15 c d+8 d^2\right )+a \left (6 c^2-20 c d+9 d^2\right ) \sin (e+f x)\right ) \, dx}{3 a^2} \\ & = \frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) x}{2 a}+\frac {2 d \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right ) \cos (e+f x)}{3 a f}+\frac {d^2 \left (6 c^2-20 c d+9 d^2\right ) \cos (e+f x) \sin (e+f x)}{6 a f}+\frac {(3 c-4 d) d \cos (e+f x) (c+d \sin (e+f x))^2}{3 a f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{f (a+a \sin (e+f x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.31 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (24 (c-d)^4 \sin \left (\frac {1}{2} (e+f x)\right )-6 d \left (-8 c^3+12 c^2 d-12 c d^2+3 d^3\right ) (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-3 d^2 \left (24 c^2-16 c d+7 d^2\right ) \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+d^4 \cos (3 (e+f x)) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-3 (4 c-d) d^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sin (2 (e+f x))\right )}{36 f (1+\sin (e+f x))} \]

[In]

Integrate[(c + d*Sin[e + f*x])^4/(3 + 3*Sin[e + f*x]),x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(24*(c - d)^4*Sin[(e + f*x)/2] - 6*d*(-8*c^3 + 12*c^2*d - 12*c*d^2 + 3*
d^3)*(e + f*x)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) - 3*d^2*(24*c^2 - 16*c*d + 7*d^2)*Cos[e + f*x]*(Cos[(e +
f*x)/2] + Sin[(e + f*x)/2]) + d^4*Cos[3*(e + f*x)]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) - 3*(4*c - d)*d^3*(Co
s[(e + f*x)/2] + Sin[(e + f*x)/2])*Sin[2*(e + f*x)]))/(36*f*(1 + Sin[e + f*x]))

Maple [A] (verified)

Time = 0.90 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.18

method result size
parallelrisch \(\frac {\left (-72 c^{2} d^{2}+48 d^{3} c -20 d^{4}\right ) \cos \left (2 f x +2 e \right )+\left (-12 d^{3} c +3 d^{4}\right ) \sin \left (3 f x +3 e \right )+d^{4} \cos \left (4 f x +4 e \right )+\left (\left (-36 f x -64\right ) d^{4}+\left (144 f x +192\right ) c \,d^{3}-144 c^{2} \left (f x +2\right ) d^{2}+96 c^{3} \left (f x +1\right ) d -24 c^{4}\right ) \cos \left (f x +e \right )+\left (24 c^{4}-96 c^{3} d +144 c^{2} d^{2}-108 d^{3} c +27 d^{4}\right ) \sin \left (f x +e \right )-24 c^{4}+96 c^{3} d -216 c^{2} d^{2}+144 d^{3} c -45 d^{4}}{24 a f \cos \left (f x +e \right )}\) \(209\)
derivativedivides \(\frac {-\frac {2 \left (c^{4}-4 c^{3} d +6 c^{2} d^{2}-4 d^{3} c +d^{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d \left (\frac {\left (2 c \,d^{2}-\frac {1}{2} d^{3}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-6 c^{2} d +4 c \,d^{2}-d^{3}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-12 c^{2} d +8 c \,d^{2}-4 d^{3}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-2 c \,d^{2}+\frac {1}{2} d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-6 c^{2} d +4 c \,d^{2}-\frac {5 d^{3}}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {\left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{f a}\) \(230\)
default \(\frac {-\frac {2 \left (c^{4}-4 c^{3} d +6 c^{2} d^{2}-4 d^{3} c +d^{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+2 d \left (\frac {\left (2 c \,d^{2}-\frac {1}{2} d^{3}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-6 c^{2} d +4 c \,d^{2}-d^{3}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-12 c^{2} d +8 c \,d^{2}-4 d^{3}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-2 c \,d^{2}+\frac {1}{2} d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-6 c^{2} d +4 c \,d^{2}-\frac {5 d^{3}}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {\left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{f a}\) \(230\)
risch \(\frac {4 d x \,c^{3}}{a}-\frac {6 d^{2} x \,c^{2}}{a}+\frac {6 d^{3} x c}{a}-\frac {3 d^{4} x}{2 a}-\frac {3 d^{2} {\mathrm e}^{i \left (f x +e \right )} c^{2}}{a f}+\frac {2 d^{3} {\mathrm e}^{i \left (f x +e \right )} c}{a f}-\frac {7 d^{4} {\mathrm e}^{i \left (f x +e \right )}}{8 a f}-\frac {3 d^{2} {\mathrm e}^{-i \left (f x +e \right )} c^{2}}{a f}+\frac {2 d^{3} {\mathrm e}^{-i \left (f x +e \right )} c}{a f}-\frac {7 d^{4} {\mathrm e}^{-i \left (f x +e \right )}}{8 a f}-\frac {2 c^{4}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {8 c^{3} d}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {12 c^{2} d^{2}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {8 d^{3} c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {2 d^{4}}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {d^{4} \cos \left (3 f x +3 e \right )}{12 a f}-\frac {d^{3} \sin \left (2 f x +2 e \right ) c}{f a}+\frac {d^{4} \sin \left (2 f x +2 e \right )}{4 f a}\) \(362\)
norman \(\frac {\frac {\left (-36 c^{2} d^{2}-4 d^{3} c -3 d^{4}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (-12 c^{2} d^{2}-4 d^{3} c +d^{4}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (2 c^{4}-8 c^{3} d +12 c^{2} d^{2}-12 d^{3} c +3 d^{4}\right ) \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (8 c^{4}-32 c^{3} d +36 c^{2} d^{2}-36 d^{3} c +9 d^{4}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (12 c^{4}-48 c^{3} d +36 c^{2} d^{2}-44 d^{3} c +7 d^{4}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {-36 c^{2} d^{2}+12 d^{3} c -7 d^{4}}{3 f a}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x}{2 a}+\frac {\left (-108 c^{2} d^{2}+12 d^{3} c -19 d^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f a}+\frac {\left (6 c^{4}-24 c^{3} d -24 d^{3} c +2 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{3 f a}+\frac {\left (24 c^{4}-96 c^{3} d +36 c^{2} d^{2}-84 d^{3} c +5 d^{4}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f a}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}+\frac {2 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {2 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {3 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {3 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {2 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {2 d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {d \left (8 c^{3}-12 c^{2} d +12 c \,d^{2}-3 d^{3}\right ) x \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) \(806\)

[In]

int((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/24*((-72*c^2*d^2+48*c*d^3-20*d^4)*cos(2*f*x+2*e)+(-12*c*d^3+3*d^4)*sin(3*f*x+3*e)+d^4*cos(4*f*x+4*e)+((-36*f
*x-64)*d^4+(144*f*x+192)*c*d^3-144*c^2*(f*x+2)*d^2+96*c^3*(f*x+1)*d-24*c^4)*cos(f*x+e)+(24*c^4-96*c^3*d+144*c^
2*d^2-108*c*d^3+27*d^4)*sin(f*x+e)-24*c^4+96*c^3*d-216*c^2*d^2+144*d^3*c-45*d^4)/a/f/cos(f*x+e)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 349, normalized size of antiderivative = 1.97 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {2 \, d^{4} \cos \left (f x + e\right )^{4} - 6 \, c^{4} + 24 \, c^{3} d - 36 \, c^{2} d^{2} + 24 \, c d^{3} - 6 \, d^{4} + {\left (12 \, c d^{3} - d^{4}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} f x - 12 \, {\left (3 \, c^{2} d^{2} - 2 \, c d^{3} + d^{4}\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left (2 \, c^{4} - 8 \, c^{3} d + 24 \, c^{2} d^{2} - 12 \, c d^{3} + 5 \, d^{4} - {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} f x\right )} \cos \left (f x + e\right ) + {\left (2 \, d^{4} \cos \left (f x + e\right )^{3} + 6 \, c^{4} - 24 \, c^{3} d + 36 \, c^{2} d^{2} - 24 \, c d^{3} + 6 \, d^{4} + 3 \, {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} f x - 3 \, {\left (4 \, c d^{3} - d^{4}\right )} \cos \left (f x + e\right )^{2} - 3 \, {\left (12 \, c^{2} d^{2} - 4 \, c d^{3} + 3 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{6 \, {\left (a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f\right )}} \]

[In]

integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

1/6*(2*d^4*cos(f*x + e)^4 - 6*c^4 + 24*c^3*d - 36*c^2*d^2 + 24*c*d^3 - 6*d^4 + (12*c*d^3 - d^4)*cos(f*x + e)^3
 + 3*(8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*f*x - 12*(3*c^2*d^2 - 2*c*d^3 + d^4)*cos(f*x + e)^2 - 3*(2*c^4
- 8*c^3*d + 24*c^2*d^2 - 12*c*d^3 + 5*d^4 - (8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*f*x)*cos(f*x + e) + (2*d
^4*cos(f*x + e)^3 + 6*c^4 - 24*c^3*d + 36*c^2*d^2 - 24*c*d^3 + 6*d^4 + 3*(8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*
d^4)*f*x - 3*(4*c*d^3 - d^4)*cos(f*x + e)^2 - 3*(12*c^2*d^2 - 4*c*d^3 + 3*d^4)*cos(f*x + e))*sin(f*x + e))/(a*
f*cos(f*x + e) + a*f*sin(f*x + e) + a*f)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 8605 vs. \(2 (170) = 340\).

Time = 3.95 (sec) , antiderivative size = 8605, normalized size of antiderivative = 48.62 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\text {Too large to display} \]

[In]

integrate((c+d*sin(f*x+e))**4/(a+a*sin(f*x+e)),x)

[Out]

Piecewise((-12*c**4*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/
2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*t
an(e/2 + f*x/2) + 6*a*f) - 36*c**4*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6
+ 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/
2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 36*c**4*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e
/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f
*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 12*c**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 +
f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(
e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 24*c**3*d*f*x*tan(e/2 + f*x/2)**7/(6*a*f*tan(e/2 + f*x/2)*
*7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*
x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 24*c**3*d*f*x*tan(e/2 + f*x/2)**6/(6*
a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4
+ 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 72*c**3*d*f*x*ta
n(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f
*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*
f) + 72*c**3*d*f*x*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2
 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*ta
n(e/2 + f*x/2) + 6*a*f) + 72*c**3*d*f*x*tan(e/2 + f*x/2)**3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2
)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 +
 f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 72*c**3*d*f*x*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 +
6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)*
*3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 24*c**3*d*f*x*tan(e/2 + f*x/2)/(6*a*f*tan(
e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f
*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 24*c**3*d*f*x/(6*a*f*tan
(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*
f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 48*c**3*d*tan(e/2 + f*x
/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 +
f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 144*c*
*3*d*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 +
 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2)
 + 6*a*f) + 144*c**3*d*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan
(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*
f*tan(e/2 + f*x/2) + 6*a*f) + 48*c**3*d/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/
2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*t
an(e/2 + f*x/2) + 6*a*f) - 36*c**2*d**2*f*x*tan(e/2 + f*x/2)**7/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f
*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e
/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 36*c**2*d**2*f*x*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2
)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 +
f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 108*c**2*d**2*f*x*tan(e/2 + f*x/2)*
*5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/
2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 108*c**2*d
**2*f*x*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**
5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x
/2) + 6*a*f) - 108*c**2*d**2*f*x*tan(e/2 + f*x/2)**3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 +
18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)
**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 108*c**2*d**2*f*x*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a
*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3
+ 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 36*c**2*d**2*f*x*tan(e/2 + f*x/2)/(6*a*f*tan(
e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f
*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 36*c**2*d**2*f*x/(6*a*f*
tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18
*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 72*c**2*d**2*tan(e/2
 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(
e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) -
72*c**2*d**2*tan(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x
/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2
+ f*x/2) + 6*a*f) - 288*c**2*d**2*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 +
 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2
)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 144*c**2*d**2*tan(e/2 + f*x/2)**3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*
tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 1
8*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 360*c**2*d**2*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2
 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*ta
n(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 72*c**2*d**2*tan(e/2 + f*x/
2)/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/
2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 144*c**2*d
**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x
/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 36*c*d**3
*f*x*tan(e/2 + f*x/2)**7/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 +
 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2)
 + 6*a*f) + 36*c*d**3*f*x*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*
tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6
*a*f*tan(e/2 + f*x/2) + 6*a*f) + 108*c*d**3*f*x*tan(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2
 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*t
an(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 108*c*d**3*f*x*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*x
/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2
+ f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 108*c*d**3*f*x*tan(e/2 + f*x/2)**
3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2
)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 108*c*d**3*
f*x*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 +
18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2)
+ 6*a*f) + 36*c*d**3*f*x*tan(e/2 + f*x/2)/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(
e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f
*tan(e/2 + f*x/2) + 6*a*f) + 36*c*d**3*f*x/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan
(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*
f*tan(e/2 + f*x/2) + 6*a*f) + 72*c*d**3*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2
)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 +
 f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 72*c*d**3*tan(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*
f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 +
 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 192*c*d**3*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2
+ f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan
(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 96*c*d**3*tan(e/2 + f*x/2)**
3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2
)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) + 216*c*d**3*
tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a
*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*
a*f) + 24*c*d**3*tan(e/2 + f*x/2)/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*
x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2
 + f*x/2) + 6*a*f) + 96*c*d**3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2
)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 +
f*x/2) + 6*a*f) - 9*d**4*f*x*tan(e/2 + f*x/2)**7/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a
*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2
+ 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 9*d**4*f*x*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2
+ f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*ta
n(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 27*d**4*f*x*tan(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)*
*7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*
x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 27*d**4*f*x*tan(e/2 + f*x/2)**4/(6*a*
f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 +
18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 27*d**4*f*x*tan(e/
2 + f*x/2)**3/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan
(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) -
 27*d**4*f*x*tan(e/2 + f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x
/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2
+ f*x/2) + 6*a*f) - 9*d**4*f*x*tan(e/2 + f*x/2)/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*
f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 +
 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 9*d**4*f*x/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*
tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6
*a*f*tan(e/2 + f*x/2) + 6*a*f) - 18*d**4*tan(e/2 + f*x/2)**6/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/
2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2
+ f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 18*d**4*tan(e/2 + f*x/2)**5/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f
*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 +
18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 48*d**4*tan(e/2 + f*x/2)**4/(6*a*f*tan(e/2 + f*
x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2
 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 48*d**4*tan(e/2 + f*x/2)**3/(6*a
*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/2 + f*x/2)**4 +
 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 78*d**4*tan(e/2 +
 f*x/2)**2/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f*tan(e/
2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*f) - 14
*d**4*tan(e/2 + f*x/2)/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 1
8*a*f*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) +
 6*a*f) - 32*d**4/(6*a*f*tan(e/2 + f*x/2)**7 + 6*a*f*tan(e/2 + f*x/2)**6 + 18*a*f*tan(e/2 + f*x/2)**5 + 18*a*f
*tan(e/2 + f*x/2)**4 + 18*a*f*tan(e/2 + f*x/2)**3 + 18*a*f*tan(e/2 + f*x/2)**2 + 6*a*f*tan(e/2 + f*x/2) + 6*a*
f), Ne(f, 0)), (x*(c + d*sin(e))**4/(a*sin(e) + a), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 725 vs. \(2 (181) = 362\).

Time = 0.30 (sec) , antiderivative size = 725, normalized size of antiderivative = 4.10 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\text {Too large to display} \]

[In]

integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

-1/3*(d^4*((7*sin(f*x + e)/(cos(f*x + e) + 1) + 39*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 24*sin(f*x + e)^3/(co
s(f*x + e) + 1)^3 + 24*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 9*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 9*sin(f*x
 + e)^6/(cos(f*x + e) + 1)^6 + 16)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a*sin(f*x + e)^2/(cos(f*x + e) +
 1)^2 + 3*a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 3*a*sin(f*x + e)^5
/(cos(f*x + e) + 1)^5 + a*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 9*arc
tan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 12*c*d^3*((sin(f*x + e)/(cos(f*x + e) + 1) + 5*sin(f*x + e)^2/(cos(f
*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 4)/(a + a*sin
(f*x + e)/(cos(f*x + e) + 1) + 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2*a*sin(f*x + e)^3/(cos(f*x + e) + 1)
^3 + a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(c
os(f*x + e) + 1))/a) + 36*c^2*d^2*((sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)
/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x +
e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - 24*c^3*d*(arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a
+ 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) + 6*c^4/(a + a*sin(f*x + e)/(cos(f*x + e) + 1)))/f

Giac [A] (verification not implemented)

none

Time = 0.51 (sec) , antiderivative size = 293, normalized size of antiderivative = 1.66 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {\frac {3 \, {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} {\left (f x + e\right )}}{a} - \frac {12 \, {\left (c^{4} - 4 \, c^{3} d + 6 \, c^{2} d^{2} - 4 \, c d^{3} + d^{4}\right )}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}} + \frac {2 \, {\left (12 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 3 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 36 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 24 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 6 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 72 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 48 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 24 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 12 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 36 \, c^{2} d^{2} + 24 \, c d^{3} - 10 \, d^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{3} a}}{6 \, f} \]

[In]

integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

1/6*(3*(8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*(f*x + e)/a - 12*(c^4 - 4*c^3*d + 6*c^2*d^2 - 4*c*d^3 + d^4)/
(a*(tan(1/2*f*x + 1/2*e) + 1)) + 2*(12*c*d^3*tan(1/2*f*x + 1/2*e)^5 - 3*d^4*tan(1/2*f*x + 1/2*e)^5 - 36*c^2*d^
2*tan(1/2*f*x + 1/2*e)^4 + 24*c*d^3*tan(1/2*f*x + 1/2*e)^4 - 6*d^4*tan(1/2*f*x + 1/2*e)^4 - 72*c^2*d^2*tan(1/2
*f*x + 1/2*e)^2 + 48*c*d^3*tan(1/2*f*x + 1/2*e)^2 - 24*d^4*tan(1/2*f*x + 1/2*e)^2 - 12*c*d^3*tan(1/2*f*x + 1/2
*e) + 3*d^4*tan(1/2*f*x + 1/2*e) - 36*c^2*d^2 + 24*c*d^3 - 10*d^4)/((tan(1/2*f*x + 1/2*e)^2 + 1)^3*a))/f

Mupad [B] (verification not implemented)

Time = 9.87 (sec) , antiderivative size = 451, normalized size of antiderivative = 2.55 \[ \int \frac {(c+d \sin (e+f x))^4}{3+3 \sin (e+f x)} \, dx=\frac {d\,\mathrm {atan}\left (\frac {d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (8\,c^3-12\,c^2\,d+12\,c\,d^2-3\,d^3\right )}{8\,c^3\,d-12\,c^2\,d^2+12\,c\,d^3-3\,d^4}\right )\,\left (8\,c^3-12\,c^2\,d+12\,c\,d^2-3\,d^3\right )}{a\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (12\,c^2\,d^2-4\,c\,d^3+\frac {7\,d^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,c^4-8\,c^3\,d+12\,c^2\,d^2-12\,c\,d^3+3\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (6\,c^4-24\,c^3\,d+48\,c^2\,d^2-32\,c\,d^3+8\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (6\,c^4-24\,c^3\,d+60\,c^2\,d^2-36\,c\,d^3+13\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (12\,c^2\,d^2-12\,c\,d^3+3\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (24\,c^2\,d^2-16\,c\,d^3+8\,d^4\right )-16\,c\,d^3-8\,c^3\,d+2\,c^4+\frac {16\,d^4}{3}+24\,c^2\,d^2}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )} \]

[In]

int((c + d*sin(e + f*x))^4/(a + a*sin(e + f*x)),x)

[Out]

(d*atan((d*tan(e/2 + (f*x)/2)*(12*c*d^2 - 12*c^2*d + 8*c^3 - 3*d^3))/(12*c*d^3 + 8*c^3*d - 3*d^4 - 12*c^2*d^2)
)*(12*c*d^2 - 12*c^2*d + 8*c^3 - 3*d^3))/(a*f) - (tan(e/2 + (f*x)/2)*((7*d^4)/3 - 4*c*d^3 + 12*c^2*d^2) + tan(
e/2 + (f*x)/2)^6*(2*c^4 - 8*c^3*d - 12*c*d^3 + 3*d^4 + 12*c^2*d^2) + tan(e/2 + (f*x)/2)^4*(6*c^4 - 24*c^3*d -
32*c*d^3 + 8*d^4 + 48*c^2*d^2) + tan(e/2 + (f*x)/2)^2*(6*c^4 - 24*c^3*d - 36*c*d^3 + 13*d^4 + 60*c^2*d^2) + ta
n(e/2 + (f*x)/2)^5*(3*d^4 - 12*c*d^3 + 12*c^2*d^2) + tan(e/2 + (f*x)/2)^3*(8*d^4 - 16*c*d^3 + 24*c^2*d^2) - 16
*c*d^3 - 8*c^3*d + 2*c^4 + (16*d^4)/3 + 24*c^2*d^2)/(f*(a + a*tan(e/2 + (f*x)/2) + 3*a*tan(e/2 + (f*x)/2)^2 +
3*a*tan(e/2 + (f*x)/2)^3 + 3*a*tan(e/2 + (f*x)/2)^4 + 3*a*tan(e/2 + (f*x)/2)^5 + a*tan(e/2 + (f*x)/2)^6 + a*ta
n(e/2 + (f*x)/2)^7))